﻿<Controls:MetroWindow x:Class="ChoWorkflowDashboard.ChoTaskDependencyWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:local="clr-namespace:ChoWorkflowDashboard;assembly="
        Title="Task Dependencies formula editor" Height="500" Width="600" MinHeight="340" MinWidth="450" ShowInTaskbar="False" 
        Background="AliceBlue" Topmost="False"
        BorderBrush="{DynamicResource AccentColorBrush}"
        BorderThickness="1"
                      >
    <DockPanel LastChildFill="True" FocusManager.FocusedElement="{Binding ElementName=txtInput}">
        <DockPanel Margin="2" DockPanel.Dock="Bottom">
            <StackPanel DockPanel.Dock="Right" HorizontalAlignment="Stretch" Orientation="Horizontal" Margin="2" >
                <Button Grid.Row="2" Grid.Column="1" Content="OK" IsDefault="True" Name="btnOK" TabIndex="50" Tag="4" Width="75" Click="btnOK_Click" />
                <Button Grid.Row="2" Grid.Column="2" Content="Cancel" Margin="2,0,0,0" IsCancel="True" Name="btnCancel" TabIndex="51" Tag="5" Width="75" Click="btnCancel_Click" />
            </StackPanel>
            <StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal" Margin="2" >
                <Label Content="Fire After:" Name="label7" HorizontalContentAlignment="Center"/>
                <xctk:IntegerUpDown Name="iudFireAfter" FormatString="N0" Width="100" TabIndex="17" Value="{Binding Path=FIRE_AFTER_DEPENDENCY}" Minimum="0" />
                <Label Content="(mins)" Name="label8" />
            </StackPanel>
        </DockPanel>
        <Grid DockPanel.Dock="Bottom" Margin="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="40*" />
                <RowDefinition Height="2" />
                <RowDefinition Height="30*" />
                <RowDefinition Height="2" />
                <RowDefinition Height="40*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <GroupBox Grid.Row="0" Header="Task Dependencies" >
                <TextBox Name="txtInput" Text="{Binding Path=DEPENDENCIES, UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" TabIndex="1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
            </GroupBox>
            <GridSplitter Grid.Row="1" Height="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ResizeBehavior="BasedOnAlignment" />
            <GroupBox Grid.Row="2" Header="Error Message" >
                <TextBlock Name="lblErrMsg" Focusable="True" />
            </GroupBox>
            <GridSplitter Grid.Row="3" Height="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ResizeBehavior="BasedOnAlignment" />
            <GroupBox Grid.Row="4" Header="Help" >
                <TextBox Name="lblAvailFuncs" Focusable="True" Cursor="IBeam" VerticalScrollBarVisibility="Auto" IsTabStop="False" IsUndoEnabled="False" IsReadOnlyCaretVisible="True" TextWrapping="WrapWithOverflow" />
            </GroupBox>
        </Grid>

    </DockPanel>
</Controls:MetroWindow>
